Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 4 - Dialog Manager Reference / Dialog Manager Functions
Creating Alerts /


StandardAlert

NEW WITH THE APPEARANCE MANAGER

Displays a standard alert box.

pascal OSErr StandardAlert (
                     AlertType inAlertType,
                     StringPtr inError,
                     StringPtr inExplanation,
                     AlertStdAlertParamPtr inAlertParam,
                     SInt16 *outItemHit);
inAlertType
A constant indicating the type of alert box you wish to create; see "Alert Type Constants".
inError
A pointer to a Pascal string containing the primary error text you wish to display.
inExplanation
A pointer to a Pascal string containing the secondary text you wish to display; secondary text is displayed in the small system font. Pass nil to indicate no secondary text.
inAlertParam
A pointer to the standard alert structure; see "The Standard Alert Structure". Pass nil to specify that you do not wish to your alert box to incorporate any of the features that the standard alert structure provides.
outItemHit
A pointer to an integer that on output will contain a value indicating the alert button pressed; see "Alert Button Constants".
function result
A result code; see "Result Codes".
DISCUSSION
The StandardAlert function displays an alert box based on the values you pass it. You can pass the error text you wish displayed in the error and explanation parameters, and customize the alert button text by filling in the appropriate fields of the standard alert structure passed in the inAlertParam parameter.

StandardAlert automatically resizes the height of a dialog box to fit all static text. It ignores alert stages and therefore provides no corresponding alert sounds.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998